#include <stdio.h>
#include <wiringPi.h>


#define	SERVO	7

int main (void)
{
  int n,m;
  printf ("Raspberry move servo\n") ;

  wiringPiSetup () ;
  pinMode (SERVO, OUTPUT) ;

  for (n=0;n<10000;n++)
  {
  for (m=500;m<2500;m+=5)
  {
    digitalWrite (SERVO, LOW) ;	// On
    delay (20) ;		// mS
    digitalWrite (SERVO, HIGH) ;	// Off
    delayMicroseconds(m) ;
  }
  }
  return 0 ;
}
